package com.eshopkeeper.core.util.yunzhi;

/**
 * 
 * @author chen
 *
 */
public class RequestHeader {
	/**
	 * 客户端英文简称 必填 nuojfApp nuojfWeb rpcXyz nuojfApp ios android使用 nuojfWeb
	 * webservice调用javaservice使用 rpcXyz 内网其他系统如：xyz调用javaservice使用
	 */
	private String clientName = "";
	/**
	 * 客户端版本 可空
	 */
	private String clientVersion = "";
	/**
	 * 操作系统 可空 android ios windows macos linux other
	 */
	private String os = "";
	/**
	 * 操作系统版本 可空
	 */
	private String osVersion = "";
	/**
	 * 设备品牌 可空
	 */
	private String brand = "";
	/**
	 * 设备型号 可空
	 */
	private String model = "";
	/**
	 * 设备UUID 安装时生成 可空
	 */
	private String uuid = "";
	/**
	 * 网络类型 wifi 2g 3g 4g 可空
	 */
	private String networkType = "";

	/**
	 * 分辨率 可空
	 */
	private String resolution = "";

	/**
	 * 系统时间 非空
	 */
	private Long st = 0L;

	/**
	 * 签名 可空
	 */
	private String sign = "";

	/**
	 * token 从请求头或cookie中获取
	 */
	private String token = "";

	/**
	 * userId
	 */
	private Long userId;

	/**
	 * token签发时间
	 */
	private Long issueAt = 0L;

	/**
	 * token过期时间
	 */
	private Long expiresAt = 0L;

	public String getAppName() {
		return clientName;
	}

	public void setAppName(String appName) {
		this.clientName = appName;
	}

	public String getAppVersion() {
		return clientVersion;
	}

	public void setAppVersion(String appVersion) {
		this.clientVersion = appVersion;
	}

	public String getOs() {
		return os;
	}

	public void setOs(String os) {
		this.os = os;
	}

	public String getOsVersion() {
		return osVersion;
	}

	public void setOsVersion(String osVersion) {
		this.osVersion = osVersion;
	}

	public String getBrand() {
		return brand;
	}

	public void setBrand(String brand) {
		this.brand = brand;
	}

	public String getModel() {
		return model;
	}

	public void setModel(String model) {
		this.model = model;
	}

	public String getUuid() {
		return uuid;
	}

	public void setUuid(String uuid) {
		this.uuid = uuid;
	}

	public String getNetworkType() {
		return networkType;
	}

	public void setNetworkType(String networkType) {
		this.networkType = networkType;
	}

	public String getResolution() {
		return resolution;
	}

	public void setResolution(String resolution) {
		this.resolution = resolution;
	}

	public Long getSt() {
		return st;
	}

	public void setSt(Long st) {
		this.st = st;
	}

	public String getSign() {
		return sign;
	}

	public void setSign(String sign) {
		this.sign = sign;
	}

	public String getToken() {
		return token;
	}

	public void setToken(String token) {
		this.token = token;
	}

	public Long getUserId() {
		return userId;
	}

	public String userId2String(){
		if(null == userId)
			return null;
		return String.valueOf(userId);
	}
	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public Long getIssueAt() {
		return issueAt;
	}

	public void setIssueAt(Long issueAt) {
		this.issueAt = issueAt;
	}

	public Long getExpiresAt() {
		return expiresAt;
	}

	public void setExpiresAt(Long expiresAt) {
		this.expiresAt = expiresAt;
	}

	@Override
	public String toString() {
		return "{" + "clientName='" + clientName + '\'' + ", clientVersion='" + clientVersion + '\'' + ", os='" + os
				+ '\'' + ", osVersion='" + osVersion + '\'' + ", brand='" + brand + '\'' + ", model='" + model + '\''
				+ ", resolution='" + resolution + '\'' + ", uuid='" + uuid + '\'' + ", networkType='" + networkType
				+ '\'' + ", st=" + st + ", sign='" + sign + '\'' + ", token='" + token + '\'' + ", userId=" + userId
				+ ", expiresAt=" + expiresAt + ", issueAt=" + issueAt + '}';
	}
}